package com.yuhanginfo.modules.sys.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


import com.yuhanginfo.common.service.CrudService;
import com.yuhanginfo.modules.sys.dao.SysUserStoreDao;
import com.yuhanginfo.modules.sys.entity.SysUserStore;

/**
 * 管理员门店关联Service
 * @author lvls
 * @version 2017-09-20
 */
@Service
@Transactional(readOnly = true)
public class SysUserStoreService extends CrudService<SysUserStoreDao, SysUserStore> {
	
	@Autowired
	private SysUserStoreDao sysUserStoreDao;


	
	@Transactional(readOnly = false)
	public void save(SysUserStore sysUserStore) {
		super.save(sysUserStore);
	}
	
	@Transactional(readOnly = false)
	public void delete(SysUserStore sysUserStore) {
		super.delete(sysUserStore);
	}

	public List<String> selectStoreBySysUserId(String id) {
		return sysUserStoreDao.selectStoreBySysUserId(id);
	}
	
	public Boolean isExistByUserIdAndSroreCode(SysUserStore sysUserStore) {
		return sysUserStoreDao.isExistByUserIdAndSroreCode(sysUserStore);
	}
	
}